const Koa = require('koa');
const Router = require('koa-router');

const app  = new Koa();

const router = new Router();

router.get('/',function (ctx,next) {
    ctx.body = ctx.query;
});

app
    .use(router.routes())
    .use(router.allowedMethods());

// 监听端口
app.listen(3000,() => {
    //监听回调
    console.log('app is start at port 3000');
});
